package com.indusfo.spc.pojo;

import com.indusfo.spc.common.pojo.BasePojo;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @ProjectName: IEIS2-COM
 * @Package: com.indusfo.spc.pojo
 * @ClassName: Blxx
 * @Author: 熊冰
 * @Description: 不良现象
 * @Date: 2019/8/20 14:56
 * @Version: 1.0
 */
@Table(name = "ba_badpheno")
public class Blxx  extends BasePojo {
    @Id
    @Column(name = "badpheno_id",insertable=false)
//不良现象编号
    private Integer badphenoId;
//不良现象名称
    private String badphenoName;
//类型编号
    private Integer badphenoTypeId;

    //类型名称
    private String badphenoTypeName;
//备注
    private String remark;
//数据状态
//1，正常，2.删除，3、停用
    private Integer dataState;


    //

    //状态码翻译
    private String dataStateName;

    public String getDataStateName() {
        Integer dataState = getDataState();
        String dataStateName ="";
        switch (dataState){
            case 1:
                dataStateName = "启用";
                break;
            case 2:
                dataStateName = "删除";
                break;
            case 3:
                dataStateName = "停用";
                break;
        }
        return dataStateName;
    }

    public void setDataStateName(String dataStateName) {
        this.dataStateName = dataStateName;
    }

    public String getBadphenoTypeName() {
        return badphenoTypeName;
    }

    public void setBadphenoTypeName(String badphenoTypeName) {
        this.badphenoTypeName = badphenoTypeName;
    }

    public Blxx() {
        super();
    }

    public Integer getBadphenoId() {
        return badphenoId;
    }

    public void setBadphenoId(Integer badphenoId) {
        this.badphenoId = badphenoId;
    }

    public String getBadphenoName() {
        return badphenoName;
    }

    public void setBadphenoName(String badphenoName) {
        this.badphenoName = badphenoName == null ? null : badphenoName.trim();
    }

    public Integer getBadphenoTypeId() {
        return badphenoTypeId;
    }

    public void setBadphenoTypeId(Integer badphenoTypeId) {
        this.badphenoTypeId = badphenoTypeId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public Integer getDataState() {
        return dataState;
    }

    public void setDataState(Integer dataState) {
        this.dataState = dataState;
    }

    @Override
	public String toString() {
		return "Blxx [badphenoId=" + badphenoId + ", badphenoName=" + badphenoName + ", badphenoTypeId="
				+ badphenoTypeId + ", badphenoTypeName=" + badphenoTypeName + ", remark=" + remark + ", dataState="
				+ dataState + ", dataStateName=" + dataStateName + "]";
	}

	public String BasePojoToString() {
        return super.toString();
    }

}